// 取appid对应密钥
import fs from 'fs';
import path from 'path';

const brandConfigPath = path.join(__dirname, '../../brand-config.json');
const brandData = JSON.parse(fs.readFileSync(brandConfigPath, 'utf-8'));

export function getBrandConfig(brand: string): { app_id: string; app_secret: string } {
  if (!(brand in brandData)) {
    throw new Error(`Unknown brand: ${brand}`);
  }
  return brandData[brand];
}
